package tech.aistar.corejava.day05.HomeWork;

/**
 * Created by 李雨昂 on 2019/7/20.
 */
public class UglyNumber {
    public static void main(String[] args) {
        test(12);
    }
    public static int test(int n){
        int[] arr = new int[n];
        int pos = 0;
        for (int i = 2; i < 10; i++) {
            if(i % 2 == 0 || i % 3 == 0 || i % 5 == 0){
                arr[pos++] = i;
            }
        }
        return arr[n];
    }


}
